﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.Xml;

namespace StellarMedical.Web
{
    [ServiceContract(Namespace = "Silverlight", CallbackContract = typeof(IDuplexClient))]
    public interface IDuplexService
    {
        [OperationContract(IsOneWay = true)]
        void BeginFetchData(string url);

        [OperationContract(IsOneWay = true)]
        void InitiateDuplex();

    }

    [ServiceContract]
    public interface IDuplexClient
    {
        [OperationContract(IsOneWay = true, AsyncPattern = true)]
        IAsyncResult BeginReceiveItem(RssItem item, AsyncCallback callback, object state);

        [OperationContract(IsOneWay = true, AsyncPattern = true)]
        IAsyncResult BeginReceiveTitle(RssInfo info, AsyncCallback callback, object state);

        void EndReceiveTitle(IAsyncResult result);
        void EndReceiveItem(IAsyncResult result);

    }
}